﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using CRM.Entity;

using CRM.BLL;
using DP.Web.UI.Controls;
using DP.Web.UI;
using DP.Common;

namespace CRM.Web.ServiceQualityRepot
{
    public partial class List : Common.PageBase
    {

        public string ModifyUrl = "Modify.aspx?SERVICEREPOTID={0}";
        T_SERVICEQUALITYREPOT_BLL bll = new T_SERVICEQUALITYREPOT_BLL();
        //SqlServerDAL<T_SERVICEQUALITYREPOT_Entity> dal = new SqlServerDAL<T_SERVICEQUALITYREPOT_Entity>();

        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            PageHelper.SetPrePageUrl(this.Page);
            //PageHelper.SetPopCalender(this.Page, txtMAINTENANCEDATEBegin);
            //PageHelper.SetPopCalender(this.Page, txtMAINTENANCEDATEEnd);
            //PageHelper.SetPopCalender(this.Page, txtMANUFACTUREDATEBegin);
            //PageHelper.SetPopCalender(this.Page, txtMANUFACTUREDATEEnd);
            //PageHelper.SetPopCalender(this.Page, txtSALEDATEBegin);
            //PageHelper.SetPopCalender(this.Page, txtSALEDATEEnd);
            //PageHelper.SetPopCalender(this.Page, txtRETURNDATEBegin);
            //PageHelper.SetPopCalender(this.Page, txtRETURNDATEEnd);
            PageHelper.SetPopCalender(this.Page, txtCREATETIMEBegin);
            PageHelper.SetPopCalender(this.Page, txtCREATETIMEEnd);
            //PageHelper.SetPopCalender(this.Page, txtLASTMODIFYTIMEBegin);
            //PageHelper.SetPopCalender(this.Page, txtLASTMODIFYTIMEEnd);

        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ddlSTATUSBinding();



                GetUrlQueryToControl();
                gvDataBinding();
            }
        }

        #region 页面初始化数据绑定

        /// <summary>
        /// DDLs the STATE binding.
        /// </summary>
        private void ddlSTATUSBinding()
        {
            ddlSTATUS.Items.Clear();
            EnumHelper.FillListControl(ddlSTATUS, typeof(ServiceQualityStatus));
            ddlSTATUS.Items.Insert(0, new ListItem("", ""));
        }



        #endregion

        /// <summary>
        /// 获取 URL 上的参数存入当页面 控件中。
        /// </summary>
        private void GetUrlQueryToControl()
        {
            PageHelper.GetUrlQueryToControl(this.Page);
        }

        /// <summary>
        /// 生成查询条件字符串
        /// </summary>
        private StringBuilder GenerationSQLString()
        {
            StringBuilder sql = new StringBuilder();
            #region 链接参数
            if (!String.IsNullOrEmpty(Request.QueryString["SERVICEREPOTID"]))
            {
                sql.Append(" and SERVICEREPOTID like '%" + Request.QueryString["SERVICEREPOTID"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["SERIALNUMBER"]))
            {
                sql.Append(" and SERIALNUMBER like '%" + Request.QueryString["SERIALNUMBER"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["AGENCYNAME"]))
            {
                sql.Append(" and AGENCYNAME like '%" + Request.QueryString["AGENCYNAME"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["AGENTSERVICESMANAGER"]))
            {
                sql.Append(" and AGENTSERVICESMANAGER like '%" + Request.QueryString["AGENTSERVICESMANAGER"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["SERVICEMANAGERPHONE"]))
            {
                sql.Append(" and SERVICEMANAGERPHONE like '%" + Request.QueryString["SERVICEMANAGERPHONE"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["CUSTOMERNAME"]))
            {
                sql.Append(" and CUSTOMERNAME like '%" + Request.QueryString["CUSTOMERNAME"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["CUSTOMERTEL"]))
            {
                sql.Append(" and CUSTOMERTEL like '%" + Request.QueryString["CUSTOMERTEL"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["CONTACT"]))
            {
                sql.Append(" and CONTACT like '%" + Request.QueryString["CONTACT"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["CONTACTTEL"]))
            {
                sql.Append(" and CONTACTTEL like '%" + Request.QueryString["CONTACTTEL"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["MAINTENANCESTAFF"]))
            {
                sql.Append(" and MAINTENANCESTAFF like '%" + Request.QueryString["MAINTENANCESTAFF"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["MAINTENANCESTAFFTEL"]))
            {
                sql.Append(" and MAINTENANCESTAFFTEL like '%" + Request.QueryString["MAINTENANCESTAFFTEL"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["MAINTENANCEDATEBegin"]))
            {
                sql.Append(" and " + bll._dal.GetBeginDateString("MAINTENANCEDATE", Request.QueryString["MAINTENANCEDATEBegin"].Trim()) + " ");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["MAINTENANCEDATEEnd"]))
            {
                sql.Append(" and " + bll._dal.GetBeginDateString("MAINTENANCEDATE", Request.QueryString["MAINTENANCEDATEEnd"].Trim()) + " ");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["MODEL"]))
            {
                sql.Append(" and MODEL like '%" + Request.QueryString["MODEL"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["PRODUCTCODE"]))
            {
                sql.Append(" and PRODUCTCODE like '%" + Request.QueryString["PRODUCTCODE"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["MANUFACTUREDATEBegin"]))
            {
                sql.Append(" and " + bll._dal.GetBeginDateString("MANUFACTUREDATE", Request.QueryString["MANUFACTUREDATEBegin"].Trim()) + " ");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["MANUFACTUREDATEEnd"]))
            {
                sql.Append(" and " + bll._dal.GetBeginDateString("MANUFACTUREDATE", Request.QueryString["MANUFACTUREDATEEnd"].Trim()) + " ");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["SALEDATEBegin"]))
            {
                sql.Append(" and " + bll._dal.GetBeginDateString("SALEDATE", Request.QueryString["SALEDATEBegin"].Trim()) + " ");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["SALEDATEEnd"]))
            {
                sql.Append(" and " + bll._dal.GetBeginDateString("SALEDATE", Request.QueryString["SALEDATEEnd"].Trim()) + " ");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["WORKINGHOURS"]))
            {
                sql.Append(" and WORKINGHOURS like '%" + Request.QueryString["WORKINGHOURS"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["PARTSHOURS"]))
            {
                sql.Append(" and PARTSHOURS like '%" + Request.QueryString["PARTSHOURS"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["FAILUREPARTSWARRANTY"]))
            {
                sql.Append(" and FAILUREPARTSWARRANTY like '%" + Request.QueryString["FAILUREPARTSWARRANTY"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["SELFTRANSFORMATION"]))
            {
                sql.Append(" and SELFTRANSFORMATION like '%" + Request.QueryString["SELFTRANSFORMATION"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["FAULTNAME"]))
            {
                sql.Append(" and FAULTNAME like '%" + Request.QueryString["FAULTNAME"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["FAULTDRAWINGNO"]))
            {
                sql.Append(" and FAULTDRAWINGNO like '%" + Request.QueryString["FAULTDRAWINGNO"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["FAULTMANUFACTURERCODE"]))
            {
                sql.Append(" and FAULTMANUFACTURERCODE like '%" + Request.QueryString["FAULTMANUFACTURERCODE"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["FAULTLOCATIONCODE"]))
            {
                sql.Append(" and FAULTLOCATIONCODE like '%" + Request.QueryString["FAULTLOCATIONCODE"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["FAULTCODE"]))
            {
                sql.Append(" and FAULTCODE like '%" + Request.QueryString["FAULTCODE"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["AREACODE"]))
            {
                sql.Append(" and AREACODE like '%" + Request.QueryString["AREACODE"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["ENVIRONMENTALCODE"]))
            {
                sql.Append(" and ENVIRONMENTALCODE like '%" + Request.QueryString["ENVIRONMENTALCODE"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["CONDITIONCODE"]))
            {
                sql.Append(" and CONDITIONCODE like '%" + Request.QueryString["CONDITIONCODE"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["BOOMTYPE"]))
            {
                sql.Append(" and BOOMTYPE like '%" + Request.QueryString["BOOMTYPE"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["BUCKETTYPE"]))
            {
                sql.Append(" and BUCKETTYPE like '%" + Request.QueryString["BUCKETTYPE"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["SPECIALUSE"]))
            {
                sql.Append(" and SPECIALUSE like '%" + Request.QueryString["SPECIALUSE"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["FAULTWORKPLANE"]))
            {
                sql.Append(" and FAULTWORKPLANE like '%" + Request.QueryString["FAULTWORKPLANE"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["PROVINCE"]))
            {
                sql.Append(" and PROVINCE like '%" + Request.QueryString["PROVINCE"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["CITY"]))
            {
                sql.Append(" and CITY like '%" + Request.QueryString["CITY"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["VILLAGE"]))
            {
                sql.Append(" and VILLAGE like '%" + Request.QueryString["VILLAGE"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["SYMPTOM"]))
            {
                sql.Append(" and SYMPTOM like '%" + Request.QueryString["SYMPTOM"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["FAILUREREASON"]))
            {
                sql.Append(" and FAILUREREASON like '%" + Request.QueryString["FAILUREREASON"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["AGENTCOMMENTS"]))
            {
                sql.Append(" and AGENTCOMMENTS like '%" + Request.QueryString["AGENTCOMMENTS"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["FAILUREOF"]))
            {
                sql.Append(" and FAILUREOF like '%" + Request.QueryString["FAILUREOF"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["FAULTTYPE"]))
            {
                sql.Append(" and FAULTTYPE like '%" + Request.QueryString["FAULTTYPE"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["APPROACH"]))
            {
                sql.Append(" and APPROACH like '%" + Request.QueryString["APPROACH"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["INFORMATIONKIND"]))
            {
                sql.Append(" and INFORMATIONKIND like '%" + Request.QueryString["INFORMATIONKIND"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["ANSWERDEPARTMENT"]))
            {
                sql.Append(" and ANSWERDEPARTMENT like '%" + Request.QueryString["ANSWERDEPARTMENT"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["IMPORTANCE"]))
            {
                sql.Append(" and IMPORTANCE like '%" + Request.QueryString["IMPORTANCE"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["URGENCY"]))
            {
                sql.Append(" and URGENCY like '%" + Request.QueryString["URGENCY"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["INTEGRATEDDETERMINE"]))
            {
                sql.Append(" and INTEGRATEDDETERMINE like '%" + Request.QueryString["INTEGRATEDDETERMINE"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["FAILURERETURN"]))
            {
                sql.Append(" and FAILURERETURN like '%" + Request.QueryString["FAILURERETURN"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["RETURNDATEBegin"]))
            {
                sql.Append(" and " + bll._dal.GetBeginDateString("RETURNDATE", Request.QueryString["RETURNDATEBegin"].Trim()) + " ");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["RETURNDATEEnd"]))
            {
                sql.Append(" and " + bll._dal.GetBeginDateString("RETURNDATE", Request.QueryString["RETURNDATEEnd"].Trim()) + " ");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["FAILURERATE"]))
            {
                sql.Append(" and FAILURERATE like '%" + Request.QueryString["FAILURERATE"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["SERVICESDIVISIONCOMMENTS"]))
            {
                sql.Append(" and SERVICESDIVISIONCOMMENTS like '%" + Request.QueryString["SERVICESDIVISIONCOMMENTS"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["VEHICLEPLATEIMAGE"]))
            {
                sql.Append(" and VEHICLEPLATEIMAGE like '%" + Request.QueryString["VEHICLEPLATEIMAGE"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["PICTURECONDITIONIMAGE"]))
            {
                sql.Append(" and PICTURECONDITIONIMAGE like '%" + Request.QueryString["PICTURECONDITIONIMAGE"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["VISIONPICTURE"]))
            {
                sql.Append(" and VISIONPICTURE like '%" + Request.QueryString["VISIONPICTURE"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["CLOSERANGEPICTURES"]))
            {
                sql.Append(" and CLOSERANGEPICTURES like '%" + Request.QueryString["CLOSERANGEPICTURES"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["MACROPICTURE"]))
            {
                sql.Append(" and MACROPICTURE like '%" + Request.QueryString["MACROPICTURE"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["DEPARTMENTID"]))
            {
                sql.Append(" and DEPARTMENTID = '" + Request.QueryString["DEPARTMENTID"] + "'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["DEPARTMENTCODE"]))
            {
                sql.Append(" and DEPARTMENTCODE like '%" + Request.QueryString["DEPARTMENTCODE"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["DEPARTMENTNAME"]))
            {
                sql.Append(" and DEPARTMENTNAME like '%" + Request.QueryString["DEPARTMENTNAME"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["CREATETIMEBegin"]))
            {
                sql.Append(" and " + bll._dal.GetBeginDateString("CREATETIME", Request.QueryString["CREATETIMEBegin"].Trim()) + " ");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["CREATETIMEEnd"]))
            {
                sql.Append(" and " + bll._dal.GetBeginDateString("CREATETIME", Request.QueryString["CREATETIMEEnd"].Trim()) + " ");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["CREATEPEOPLEID"]))
            {
                sql.Append(" and CREATEPEOPLEID = '" + Request.QueryString["CREATEPEOPLEID"] + "'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["CREATEPEOPLE"]))
            {
                sql.Append(" and CREATEPEOPLE like '%" + Request.QueryString["CREATEPEOPLE"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["LASTMODIFYPEOPLEID"]))
            {
                sql.Append(" and LASTMODIFYPEOPLEID = '" + Request.QueryString["LASTMODIFYPEOPLEID"] + "'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["LASTMODIFYPEOPLE"]))
            {
                sql.Append(" and LASTMODIFYPEOPLE like '%" + Request.QueryString["LASTMODIFYPEOPLE"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["LASTMODIFYTIMEBegin"]))
            {
                sql.Append(" and " + bll._dal.GetBeginDateString("LASTMODIFYTIME", Request.QueryString["LASTMODIFYTIMEBegin"].Trim()) + " ");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["LASTMODIFYTIMEEnd"]))
            {
                sql.Append(" and " + bll._dal.GetBeginDateString("LASTMODIFYTIME", Request.QueryString["LASTMODIFYTIMEEnd"].Trim()) + " ");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["REMARK"]))
            {
                sql.Append(" and REMARK like '%" + Request.QueryString["REMARK"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["BUSINESSDIVISIONID"]))
            {
                sql.Append(" and BUSINESSDIVISIONID = '" + Request.QueryString["BUSINESSDIVISIONID"] + "'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["BUSINESSDIVISIONNAME"]))
            {
                sql.Append(" and BUSINESSDIVISIONNAME like '%" + Request.QueryString["BUSINESSDIVISIONNAME"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["BUSINESSDIVISIONCODE"]))
            {
                sql.Append(" and BUSINESSDIVISIONCODE like '%" + Request.QueryString["BUSINESSDIVISIONCODE"] + "%'");
            }
            if (!String.IsNullOrEmpty(Request.QueryString["STATUS"]))
            {
                sql.Append(" and STATUS = '" + Request.QueryString["STATUS"] + "'");
            }
            
            #endregion

            if (!UserLoginInfo.IsAdministrator())
            {
                sql.Append(" and BUSINESSDIVISIONCODE = '" + _userLoginInfo.UserEntity.BUSINESSDIVISIONCODE.Trim() + "'");

                switch (UserLoginInfo.GetCurrentUserType())
                {
                    case UserType.中心部门:
                        {
                            
                        }
                        break;
                    case UserType.供应商:
                    case UserType.市场部:
                    case UserType.服务商:
                    case UserType.经销商:
                        {
                            sql.Append(String.Format(" and USERTYPE = '{0}' ", _userLoginInfo.UserEntity.USERTYPE.Trim()));
                            sql.Append(String.Format(" and DepartmentID = '{0}' ", _userLoginInfo.UserEntity.DEPARTMENTID));
                        }
                        break;
                }

            }

            return sql;

        }

        /// <summary>
        /// 页面数据绑定
        /// </summary>
        private void gvDataBinding()
        {
            #region 查询条件字符串
            StringBuilder sql = GenerationSQLString();
            #endregion

            List<T_SERVICEQUALITYREPOT_Entity> list;

            //获取总的记录条数
            gvList.RecordCount = (int)bll.GetCount(sql.ToString());

            list = bll.GetList(sql.ToString(), gvList.CurrentPageIndex * gvList.PageSize, gvList.PageSize, gvList.SortConditions);

            gvList.DataSource = list;
            gvList.DataKeyNames = new string[] { "SERVICEREPOTID" };
            gvList.DataBind();

        }

        protected void btnSearch_Click(object sender, EventArgs e)
        {
            string url = HttpContext.Current.Request.Url.AbsolutePath;
            PageHelper.GetControlToUrlQuery(this.Page, ref url);
            Response.Redirect(url);
        }

        #region GridView 事件
        /// <summary>
        /// GridView 删除事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void gvList_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            T_SERVICEQUALITYREPOT_Entity entity = new T_SERVICEQUALITYREPOT_Entity();
            entity.SERVICEREPOTID = StringHelper.ToInt((sender as GridView).DataKeys[e.RowIndex].Values[0].ToString());

            long rel = bll.Delete(entity);
            if (rel > 0)
            {
                Response.Redirect(HttpContext.Current.Request.RawUrl);
            }
            else
            {

            }

        }

        /// <summary>
        /// GridView 行数据绑定事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void gvList_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            string temp = string.Empty;
            switch (e.Row.RowType)
            {
                case DataControlRowType.DataRow:
                    {
                        GridView gv = (sender as GridView);
                        for (int i = 0; i < gv.Columns.Count; i++)
                        {
                            TemplateField tf = gv.Columns[i] as TemplateField;
                            if (tf != null)
                            {
                                #region 存储值 转换成  显示值
                                switch (tf.HeaderText)
                                {
                                    case "操作":
                                        {
                                            e.Row.Cells[i].Attributes.Add("style", "white-space: nowrap;");
                                        }
                                        break;
                                    default:
                                        {
                                            e.Row.Cells[i].Attributes.Add("style", "white-space: nowrap;");
                                        }
                                        break;

                                }
                                #endregion
                            }

                            BoundField bf = gv.Columns[i] as BoundField;
                            if (bf != null)
                            {
                                #region 存储值 转换成  显示值
                                switch (bf.DataField)
                                {
                                    case "STATUS":
                                        {
                                            temp = e.Row.Cells[i].Text.Trim();
                                            temp = ((ServiceQualityStatus)Enum.Parse(typeof(ServiceQualityStatus), temp)).ToString();
                                            e.Row.Cells[i].Text = temp;
                                        }
                                        break;
                                    default:
                                        {

                                        }
                                        break;
                                }
                                #endregion
                            }
                        }
                    }
                    break;
                case DataControlRowType.Header:
                    {

                    }
                    break;
                case DataControlRowType.Pager:
                    {

                    }
                    break;
                case DataControlRowType.EmptyDataRow:
                    {


                    }
                    break;
                default:

                    break;
            }

        }

        /// <summary>
        /// GridView 行创建事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void gvList_RowCreated(object sender, GridViewRowEventArgs e)
        {
            switch (e.Row.RowType)
            {
                case DataControlRowType.DataRow:
                    {

                    }
                    break;
                case DataControlRowType.Header:
                    {

                    }
                    break;
                case DataControlRowType.Pager:
                    {

                    }
                    break;
                case DataControlRowType.EmptyDataRow:
                    {


                    }
                    break;
                default:

                    break;
            }

        }
        #endregion
    }
}
